﻿<UserControl x:Class="Epi.WPF.Dashboard.DashboardControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dashboard="clr-namespace:Epi.WPF.Dashboard"
    xmlns:Controls="clr-namespace:Epi.WPF.Dashboard.Controls"
    xmlns:CommonControls="clr-namespace:Epi.WPF.Controls;assembly=Epi.WPF"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    mc:Ignorable="d"
    d:DesignHeight="510" d:DesignWidth="900">
    
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="ResourceDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:Name="grdMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="24"></RowDefinition>
            <RowDefinition Height="1"></RowDefinition>
            <RowDefinition Height="0"></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="0"></RowDefinition>
            <RowDefinition Height="0"></RowDefinition>
            <RowDefinition Height="0"></RowDefinition>
            <RowDefinition Height="28"></RowDefinition>
        </Grid.RowDefinitions>

        <DockPanel Grid.Row="1" Background="{StaticResource windowBorderColor}"></DockPanel>

        <DockPanel SnapsToDevicePixels="True" Grid.Row="0">
                <!--<Rectangle Style="{DynamicResource shadowRectangle}"></Rectangle>-->
                <CommonControls:DashboardFileMenuControl x:Name="menuControl" />
        </DockPanel>

        <Controls:NotificationPanel Visibility="Visible" IsHitTestVisible="False" x:Name="panelNotification" Grid.Row="3" Height="52" MinWidth="720" VerticalAlignment="Bottom"></Controls:NotificationPanel>

        <Image Margin="0, 10, 30, 0" Opacity="0.15" Width="79" Height="77" Source="Images/watermark_logo.png" Visibility="Visible" IsHitTestVisible="False" x:Name="imageWatermark" Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Top"/>

        <ScrollViewer Grid.Row="3" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible" CanContentScroll="True" x:Name="scrollViewerAnalysis">
            <ScrollViewer.ContextMenu>
                <ContextMenu>
                    <MenuItem x:Name="mnuDataSource" Header="Set data source...">
                        <MenuItem.Icon>
                            <Image Source="Images/db_add.png" Stretch="Fill" Height="16px" Width="16px" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem x:Name="mnuAddRelatedData" Header="Add related data source..." />
                    <MenuItem x:Name="mnuOpen" Header="Open canvas..." />
                    <MenuItem x:Name="mnuSave" Header="Save canvas" />
                    <MenuItem x:Name="mnuSaveAs" Header="Save canvas as..." />
                    <Separator/>
                    <MenuItem x:Name="mnuSaveOutput" Header="Save output as HTML">
                        <MenuItem.Icon>
                            <Image Source="Images/saveHTML.png" Stretch="Fill" Height="16px" Width="16px" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem x:Name="mnuSendOutputTo" Header="Send output to" IsEnabled="False">
                        <MenuItem x:Name="mnuSendOutputToExcel" Header="Microsoft Excel" IsEnabled="False" />
                        <MenuItem x:Name="mnuSendOutputToWord" Header="Microsoft Word" IsEnabled="False" />
                    </MenuItem>
                    <MenuItem x:Name="mnuExport" Header="Export data" IsEnabled="False" />
                    <Separator/>
                    <MenuItem x:Name="mnuAddGadget" Header="Add Analysis Gadget">
                        <MenuItem.Icon>
                            <Image Source="Images/gadget.png" Stretch="None" />
                        </MenuItem.Icon>
                        <MenuItem x:Name="mnuLineList" Header="Line List" />
                        <MenuItem x:Name="mnuFrequency" Header="Frequency"/>
                        <MenuItem x:Name="mnuAberration" Header="Aberration Detection"/>
                        <MenuItem x:Name="mnuCombinedFrequency" Header="Combined Frequency"/>
                        <MenuItem x:Name="mnu2x2" Header="2 x 2 Table" Visibility="Collapsed" />
                        <MenuItem x:Name="mnuMxN" Header="M x N / 2 x 2 Table" IsEnabled="True"/>
                        <MenuItem x:Name="mnuMeans" Header="Means"/>
                        <MenuItem x:Name="mnuChart" Header="Chart"/>
                        <MenuItem x:Name="mnuAdvStats"  Header="Advanced Statistics">
                            <MenuItem x:Name="mnuLinear" Header="Linear Regression" IsEnabled="True"/>
                            <MenuItem x:Name="mnuLogistic" Header="Logistic Regression" IsEnabled="True"/>
                            <MenuItem x:Name="mnuCox" Header="Cox Proportional Hazards" IsEnabled="False" Visibility="Collapsed"/>
                            <MenuItem x:Name="mnuKM" Header="Kaplan Meier Survival" IsEnabled="False" Visibility="Collapsed"/>
                            <MenuItem x:Name="mnuCSFrequency" Header="Complex Sample Frequencies" IsEnabled="True"/>
                            <MenuItem x:Name="mnuCSMeans" Header="Complex Sample Means" IsEnabled="True"/>
                            <MenuItem x:Name="mnuCSTables" Header="Complex Sample Tables" IsEnabled="True"/>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem>
                        <MenuItem.Header>
                            <TextBlock x:Name="tblockAddStatCalcGadget">Add <Run FontWeight="Bold">StatCalc</Run> Calculator</TextBlock>
                        </MenuItem.Header>
                        <MenuItem x:Name="mnuStatCalc2x2" Header="Tables (2 x 2, 2 x n)"/>
                        <MenuItem x:Name="mnuSampleSizePower" Header="Sample size and power">
                            <MenuItem x:Name="mnuPopSurvey" Header="Population survey"/>
                            <MenuItem x:Name="mnuCohort" Header="Cohort or cross-sectional"/>
                            <MenuItem x:Name="mnuUnmatched" Header="Unmatched case-control"/>
                        </MenuItem>
                        <MenuItem x:Name="mnuChiSquare" Header="Chi square for trend"/>
                        <MenuItem x:Name="mnuPoisson" Header="Poisson (Rare event vs. std.)"/>
                        <MenuItem x:Name="mnuBinomial" Header="Binomial (Proportion vs. std.)"/>
                        <MenuItem x:Name="mnuMatchedPairCC" Header="Matched pair case control"/>
                    </MenuItem>
                    <MenuItem x:Name="mnuGrowthCharts">
                        <MenuItem.Header>
                            <TextBlock x:Name="tblockAddNutStatChart">Add <Run FontWeight="Bold">NutStat</Run> Growth Chart</TextBlock>
                        </MenuItem.Header>
                        <MenuItem x:Name="mnuNutStatCDCRecommended" Header="CDC Recommended Growth References" Visibility="Collapsed">
                            <MenuItem x:Name="mnuCDCRecommendedBMI" Header="Body mass index (BMI) for age"/>
                            <MenuItem x:Name="mnuCDCRecommendedHA" Header="Height for age"/>
                            <MenuItem x:Name="mnuCDCRecommendedHCA" Header="Head circumference for age"/>
                            <MenuItem x:Name="mnuCDCRecommendedLA" Header="Length for age"/>
                            <MenuItem x:Name="mnuCDCRecommendedWA" Header="Weight for age"/>
                            <MenuItem x:Name="mnuCDCRecommendedWH" Header="Weight for height"/>
                            <MenuItem x:Name="mnuCDCRecommendedWL" Header="Weight for length"/>
                        </MenuItem>
                        <MenuItem x:Name="mnuNutStatCDC2000" Header="CDC 2000 Growth Reference">
                            <MenuItem x:Name="mnuCDC2000BMI" Header="Body mass index (BMI) for age"/>
                            <MenuItem x:Name="mnuCDC2000HA" Header="Height for age"/>
                            <MenuItem x:Name="mnuCDC2000HCA" Header="Head circumference for age"/>
                            <MenuItem x:Name="mnuCDC2000LA" Header="Length for age"/>
                            <MenuItem x:Name="mnuCDC2000WA" Header="Weight for age"/>
                            <MenuItem x:Name="mnuCDC2000WH" Header="Weight for height"/>
                            <MenuItem x:Name="mnuCDC2000WL" Header="Weight for length"/>
                        </MenuItem>
                        <MenuItem x:Name="mnuNutStatWHOCGS" Header="WHO Child Growth Standards">
                            <MenuItem x:Name="mnuWHOCGSBMI" Header="Body mass index (BMI) for age"/>
                            <MenuItem x:Name="mnuWHOCGSHA" Header="Height for age"/>
                            <MenuItem x:Name="mnuWHOCGSHCA" Header="Head circumference for age"/>
                            <MenuItem x:Name="mnuWHOCGSMUACA" Header="Arm circumference for age"/>
                            <MenuItem x:Name="mnuWHOCGSLA" Header="Length for age"/>
                            <MenuItem x:Name="mnuWHOCGSWA" Header="Weight for age"/>
                            <MenuItem x:Name="mnuWHOCGSWH" Header="Weight for height"/>
                            <MenuItem x:Name="mnuWHOCGSWL" Header="Weight for length"/>
                        </MenuItem>
                        <MenuItem x:Name="mnuNutStatWHO2007" Header="WHO Reference 2007">
                            <MenuItem x:Name="mnuWHO2007BMI" Header="Body mass index (BMI) for age"/>
                            <MenuItem x:Name="mnuWHO2007HA" Header="Height for age"/>
                            <MenuItem x:Name="mnuWHO2007WA" Header="Weight for age"/>
                        </MenuItem>
                        <MenuItem x:Name="mnuNutStatWHO1978" Header="CDC/WHO 1978">
                            <MenuItem x:Name="mnuWHO1978HA" Header="Height for age"/>
                            <MenuItem x:Name="mnuWHO1978LA" Header="Length for age"/>
                            <MenuItem x:Name="mnuWHO1978WA" Header="Weight for age"/>
                            <MenuItem x:Name="mnuWHO1978WH" Header="Weight for height"/>
                            <MenuItem x:Name="mnuWHO1978WL" Header="Weight for length"/>
                        </MenuItem>
                    </MenuItem>

                    <MenuItem>
                        <MenuItem.Header>
                            <TextBlock x:Name="tblockAddReportGadget">Add Report Gadget</TextBlock>
                        </MenuItem.Header>
                        <MenuItem x:Name="mnuStandardTextBox" Header="Simple text box"/>
                        <MenuItem x:Name="mnuStandardImageBox" Header="Image box"/>
                    </MenuItem>
                    <Separator/>
                    <MenuItem x:Name="mnuProperties" Header="Canvas properties" IsEnabled="False" />
                    <MenuItem x:Name="mnuRefresh" Header="Refresh data source" IsEnabled="False">
                        <MenuItem.Icon>
                            <Image Source="Images/refresh1.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem x:Name="mnuReset" Header="Reset Dashboard" IsEnabled="False"/>
                </ContextMenu>
            </ScrollViewer.ContextMenu>


            <Controls:DragCanvas x:Name="canvasMain" AllowDragging="True" AllowDragOutOfView="True" Width="Auto" Height="8000">
                <Controls:DragCanvas.LayoutTransform >
                    <ScaleTransform x:Name="m_canvasTransform"/>
                </Controls:DragCanvas.LayoutTransform >
                <StackPanel x:Name="spTitle" Visibility="Collapsed" Controls:DragCanvas.CanBeDragged="False" Canvas.Top="100" Width="400">
                    <dashboard:WaitCursor x:Name="waitCursor" Width="25" Height="25" Visibility="Hidden" StackPanel.ZIndex="99" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0, 50, 0, 0"/>
                    <TextBlock x:Name="tblockDashboardTitle" HorizontalAlignment="Center" Text="Dashboard" Margin="0,12,0,0" FontSize="14" FontWeight="Bold"></TextBlock>
                    <TextBlock x:Name="tblockInstructions" TextAlignment="Center" TextWrapping="Wrap" HorizontalAlignment="Center" Text="Right-click on canvas to add content." Margin="0,10,0,0" FontSize="12"></TextBlock>
                    <ProgressBar x:Name="progressBar" Height="18" Margin="4, 12, 4, 8" Visibility="Collapsed" MaxWidth="150" Width="150" HorizontalAlignment="Center" />
                </StackPanel>

                <Controls:InstructionsPanel x:Name="instructionsPanel" Canvas.Top="90" Canvas.Left="100" Controls:DragCanvas.CanBeDragged="False" Visibility="Hidden" >
                    </Controls:InstructionsPanel>
                <Controls:LoadingPanel x:Name="loadingPanel" Canvas.Top="90" Canvas.Left="200" Controls:DragCanvas.CanBeDragged="False" Visibility="Hidden" Panel.ZIndex="6000"></Controls:LoadingPanel>

                <DockPanel x:Name="introPanel" Canvas.Top="40" Canvas.Left="300" Width="450" Height="Auto" Controls:DragCanvas.CanBeDragged="False">
                    <Grid>
                        <!--<Rectangle Style="{DynamicResource shadowRectangle}"></Rectangle>-->
                        <Grid Background="{StaticResource windowDarkColor}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition></RowDefinition>
                                <RowDefinition Height="42"></RowDefinition>
                                <RowDefinition Height="9"></RowDefinition>
                            </Grid.RowDefinitions>

                            <DockPanel>
                                <TextBlock x:Name="tblockIntroPanelTitle"  FontWeight="Light" Margin="16" FontSize="32" Foreground="White">Epi Info 7 Dashboard</TextBlock>
                            </DockPanel>

                            <DockPanel Grid.Row="1">
                                <TextBlock x:Name="tblockIntroText" FontWeight="Light" Margin="16" FontSize="18" TextWrapping="Wrap" Foreground="White">Right-click on the canvas to set a data source and add statistical gadgets. Or, open an existing dashboard canvas.</TextBlock>
                            </DockPanel>

                            <Grid Grid.Row="2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition></ColumnDefinition>
                                    <ColumnDefinition Width="42"></ColumnDefinition>
                                    <ColumnDefinition Width="12"></ColumnDefinition>
                                </Grid.ColumnDefinitions>

                                <TextBlock x:Name="tblockSetDataSourceNow" Grid.Column="0" FontWeight="Light" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0, 10, 25, 10" FontSize="14" Foreground="White" MouseEnter="introArrowSetDataSource_MouseEnter" MouseLeave="introArrowSetDataSource_MouseLeave" MouseLeftButtonUp="introArrowSetDataSource_MouseLeftButtonUp">Set a data source now</TextBlock>

                                <DockPanel x:Name="introArrowSetDataSource" Grid.Column="1" Background="Transparent" MouseEnter="introArrowSetDataSource_MouseEnter" MouseLeave="introArrowSetDataSource_MouseLeave" MouseLeftButtonUp="introArrowSetDataSource_MouseLeftButtonUp">
                                    <Path Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center">
                                        <Path.Data>
                                            <PathGeometry x:Name="introArrowIcon" FillRule="Nonzero" Figures="M7.34519958496094,1.19209289550781E-07L13.9831199645996,0.0134401321411133 24,10.043999671936 13.9831199645996,20.0738391876221 7.35888004302979,20.0738391876221 14.9851198196411,12.4478397369385 0,12.4478397369385 0,7.58663988113403 14.9311199188232,7.58663988113403 7.34519958496094,1.19209289550781E-07z" />
                                        </Path.Data>
                                    </Path>
                                </DockPanel>

                                <Ellipse Grid.Column="1" Stroke="White" StrokeThickness="2" ></Ellipse>

                            </Grid>

                        </Grid>
                    </Grid>
                </DockPanel>

                <StackPanel Canvas.Bottom="40" Visibility="Collapsed" Canvas.Right="40" Controls:DragCanvas.CanBeDragged="False" x:Name="panelAddSpace" MouseEnter="panelAddSpace_MouseEnter" MouseLeave="panelAddSpace_MouseLeave" MouseLeftButtonDown="panelAddSpace_MouseLeftButtonDown" MouseLeftButtonUp="panelAddSpace_MouseLeftButtonUp">
                    <StackPanel.ToolTip>
                        <ToolTip>
                            <TextBlock>Add more space to this canvas</TextBlock>
                        </ToolTip>
                    </StackPanel.ToolTip>
                    <Grid>
                        <Rectangle Style="{DynamicResource shadowRectangle}"></Rectangle>
                        <Border Style="{DynamicResource mainGadgetBorder}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>

                                <TextBlock Grid.Row="0" FontWeight="Light" FontSize="15" Foreground="DarkSlateGray" Margin="4">Add space</TextBlock>
                                <Path HorizontalAlignment="Center" Grid.Row="1" x:Name="pathAddSpace"
                              Margin="4, 4, 4, 8"
                              Fill="Gray"
                                  StrokeThickness="1"
                                  Stroke="DarkSlateGray"
                              Data="M 15 30 L 30 0 0 0 Z" IsHitTestVisible="False" VerticalAlignment="Center" />
                            </Grid>
                        </Border>
                    </Grid>
                </StackPanel>

                <DockPanel x:Name="introAvailableData" Canvas.Top="280" Canvas.Left="300" Width="550" Height="Auto" Controls:DragCanvas.CanBeDragged="True">
                    <Border Style="{DynamicResource mainGadgetBorder}">
                        <Grid>
                            <Rectangle Style="{DynamicResource shadowRectangle}"></Rectangle>

                            <Path x:Name="pathDataTriangle" Visibility="Collapsed" ClipToBounds="False"
                              Margin="22,-28,0,0"
                                  StrokeThickness="1"
                                  Stroke="{DynamicResource gadgetBorderBrush}"
                              Data="M 15 9 L 30 30 0 30 Z" Fill="{DynamicResource gadgetBorderBackgroundBrush}" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" />

                            <Grid Background="{DynamicResource gadgetBorderBackgroundBrush}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="9"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="9"></RowDefinition>
                                </Grid.RowDefinitions>

                                <DockPanel>
                                    <TextBlock x:Name="tblockCanvasFiles" FontWeight="Light" Margin="10, 10, 10, 0" FontSize="22" Foreground="DarkSlateGray">Quick Access - Available Canvas Files</TextBlock>
                                </DockPanel>

                                <DockPanel Grid.Row="4">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="24"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                                            <ColumnDefinition Width="24"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock FontSize="14" Foreground="DarkSlateGray" x:Name="tblockFindMoreCanvasFiles" Margin="10, 3, 5, 5"  MouseEnter="introArrowFindMore_MouseEnter" MouseLeave="introArrowFindMore_MouseLeave" MouseLeftButtonUp="introArrowFindMore_MouseLeftButtonUp">Browse...</TextBlock>

                                        <DockPanel x:Name="introArrowFindMore" Grid.Column="1" Background="Transparent" MouseEnter="introArrowFindMore_MouseEnter" MouseLeave="introArrowFindMore_MouseLeave" MouseLeftButtonUp="introArrowFindMore_MouseLeftButtonUp">
                                            <Path Fill="Black" HorizontalAlignment="Center" VerticalAlignment="Center">
                                                <Path.Data>
                                                    <PathGeometry x:Name="introArrowIconFindMore" FillRule="Nonzero" Figures="M3.97864985466003,5.96046447753906E-08L7.57418966293335,0.00728006660938263 13,5.44049978256226 7.57418966293335,10.8733291625977 3.98606014251709,10.8733291625977 8.11693954467773,6.7425799369812 0,6.7425799369812 0,4.10942983627319 8.08769035339355,4.10942983627319 3.97864985466003,5.96046447753906E-08z" />
                                                </Path.Data>
                                            </Path>
                                        </DockPanel>

                                        <Ellipse Grid.Column="1" Stroke="Black" StrokeThickness="1" ></Ellipse>

                                    </Grid>
                                </DockPanel>

                                <Line Grid.Row="1" X1="10" Y1="10" X2="1540" Y2="10" Stroke="Gray" StrokeDashArray="1, 4" StrokeThickness="1" />
                                <ScrollViewer x:Name="svAvailableCanvasFiles" MaxHeight="504" Grid.Row="2">
                                    <Grid x:Name="grdRecentDataSources" Margin="5">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="32"></ColumnDefinition>
                                            <ColumnDefinition></ColumnDefinition>
                                        </Grid.ColumnDefinitions>

                                        <Grid.RowDefinitions>
                                            <!--<RowDefinition></RowDefinition>
                                    <RowDefinition></RowDefinition>-->
                                        </Grid.RowDefinitions>
                                        <!--<Image Source="Images/icon_file_generic_large.png" Width="25" Height="31" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0"></Image>-->
                                        <!--<TextBlock Grid.Row="0" Grid.Column="1">EColi.prj</TextBlock>
                                <TextBlock Grid.Row="1" Grid.Column="1" Foreground="Gray">C:\TFSCode\Epi Info 7\Projects\EColi</TextBlock>-->
                                    </Grid>
                                </ScrollViewer>
                            </Grid>
                        </Grid>
                    </Border>
                </DockPanel>

                </Controls:DragCanvas>

        </ScrollViewer>

        <!--<Controls:DataDictionaryControl x:Name="dataDictionary" Visibility="Collapsed" Grid.Row="3" />-->
        <CommonControls:DataDisplayControl x:Name="dataDictionary" Visibility="Collapsed" Grid.Row ="3" />
        <CommonControls:DataDisplayControl x:Name="dataDisplay" Visibility="Collapsed" Grid.Row ="3" />        

        <!--<CommonControls:DashboardMainTabControl Grid.Row="4" Visibility="Collapsed" x:Name="mainTabControl"  />-->

        <DockPanel Grid.Row="5" Background="#9CAAC1">
        </DockPanel>        

        <DockPanel Grid.Row="6" Background="#F7FAFC">
        </DockPanel>

        <DockPanel Grid.Row="7" x:Name="dockPanelBottom" Background="{StaticResource statusBarBackground}" >
            <DockPanel.Resources>
                <Style x:Key="statusStripStyle" TargetType="{x:Type TextBlock}">
                    <Setter Property="Margin" Value="3" />
                    <Setter Property="FontSize" Value="9pt" />
                    <Setter Property="Foreground" Value="White" /> 
                    <Setter Property="FontFamily" Value="Calibri" />
                </Style>
            </DockPanel.Resources>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="16"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width=".3*"></ColumnDefinition>
                    <ColumnDefinition Width="42"></ColumnDefinition>
                    <ColumnDefinition MaxWidth="45" Width=".05*"></ColumnDefinition>
                    <ColumnDefinition MaxWidth="25" Width=".05*"></ColumnDefinition>
                    <ColumnDefinition MaxWidth="140" Width=".1*"></ColumnDefinition>
                    <ColumnDefinition MaxWidth="25" Width=".05*"></ColumnDefinition>
                    <ColumnDefinition Width="3"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <!--<TextBlock x:Name="tblockGadgetCount" FontFamily="Global User Interface" Style="{DynamicResource statusStripStyle}" Foreground="{DynamicResource textDarkGray}" Text="0 Gadgets">-->
                <TextBlock Grid.Column="1" x:Name="tblockGadgetCount"                             
                            Style="{DynamicResource statusStripStyle}" 
                            Text="0 GADGETS" VerticalAlignment="Center">
                    <TextBlock.ToolTip>
                        <ToolTip x:Name="tooltipGadgets">
                          <DockPanel>                            
                            <TextBlock x:Name="tblockGadgetsDescription"></TextBlock>
                          </DockPanel>
                        </ToolTip>
                      </TextBlock.ToolTip>
                </TextBlock>

                <!--<Border Grid.Column="1" BorderBrush="#9CAAC1" BorderThickness="1,0,0,0">
                    <StackPanel Height="Auto" Width="1"></StackPanel>
                </Border>-->
                <StackPanel Grid.Column="2" Width="20">
                </StackPanel>

                <TextBlock x:Name="tblockFieldCount" Visibility="Collapsed" Grid.Column="3" Style="{DynamicResource statusStripStyle}" Text="0 FIELDS"  VerticalAlignment="Center" >
                </TextBlock>

                <!--<TextBlock x:Name="tblockCacheTime" Visibility="Collapsed" Grid.Column="3"  FontFamily="Global User Interface" Style="{DynamicResource statusStripStyle}" Foreground="{DynamicResource textDarkGray}" Text="Data set load time: 15 seconds">
                </TextBlock>-->

                <Grid Grid.Column="4" >
                    <Controls:StatusBarBordersButton x:Name="statusStripButtonShowBorders"></Controls:StatusBarBordersButton>
                </Grid>

                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="tblockZoom" Grid.Column="5" Style="{DynamicResource statusStripStyle}" Foreground="White">100%</TextBlock>
                <Controls:FlatZoomButton x:Name="buttonZoomOut" Height="16" Width="16" HasMinusSymbol="False" Grid.Column="6" MouseLeftButtonUp="buttonZoomOut_MouseLeftButtonUp"></Controls:FlatZoomButton>
                <Controls:FlatZoomButton x:Name="buttonZoomIn" Height="16" Width="16" HasMinusSymbol="True" Grid.Column="8" MouseLeftButtonUp="buttonZoomIn_MouseLeftButtonUp"></Controls:FlatZoomButton>
                <Slider IsSnapToTickEnabled="True" Margin="0,0,0,0" TickFrequency="5" x:Name="sliderZoom" Grid.Column="7" Value="100" Minimum="50" Maximum="200" SmallChange="5" LargeChange="25" TickPlacement="BottomRight"  VerticalAlignment="Center" ValueChanged="sliderZoom_ValueChanged"></Slider>
            </Grid>

        </DockPanel>
    </Grid>


</UserControl>
